USE [RD_GLMart]
GO

/****** Object:  Index [PK_GL_Star_Facts]    Script Date: 07/02/2010 09:33:21 ******/
ALTER TABLE [dbo].[GL_Star_Facts] ADD  CONSTRAINT [PK_GL_Star_Facts] PRIMARY KEY CLUSTERED 
(
	[FiscalYear] ASC,
	[Account] ASC,
	[AID] ASC,
	[LedgerTypeCode] ASC,
	[BusinessUnitCode] ASC,
	[SubLedger] ASC,
	[SubLedgerType] ASC,
	[CurrencyCodeFrom] ASC,
	[CurrencyCodeIn] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


USE [RD_GLMart]
GO

/****** Object:  Index [IX_Facts_AccountID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_AccountID] ON [dbo].[GL_Star_Facts] 
(
	[AccountID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_AIDID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_AIDID] ON [dbo].[GL_Star_Facts] 
(
	[AIDID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_BusinessUnitID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_BusinessUnitID] ON [dbo].[GL_Star_Facts] 
(
	[BusinessUnitID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CompanyNumberID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CompanyNumberID] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_FiscalYearID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_FiscalYearID] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYearID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_LedgerTypeID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_LedgerTypeID] ON [dbo].[GL_Star_Facts] 
(
	[LedgerTypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_SubLedgerID]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_SubLedgerID] ON [dbo].[GL_Star_Facts] 
(
	[SubLedgerID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_106]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_106] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYearID] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AIDID],
[NetPosting01],
[NetPosting02],
[NetPosting03],
[NetPosting04],
[NetPosting05],
[NetPosting06],
[NetPosting07],
[NetPosting08],
[NetPosting09],
[NetPosting10],
[NetPosting11],
[NetPosting12]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_108]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_108] ON [dbo].[GL_Star_Facts] 
(
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AIDID],
[FiscalYearID],
[NetPosting01],
[NetPosting02],
[NetPosting03],
[NetPosting04],
[NetPosting05],
[NetPosting06],
[NetPosting07],
[NetPosting08],
[NetPosting09],
[NetPosting10],
[NetPosting11],
[NetPosting12]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_133]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_133] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC,
	[FiscalYearID] ASC,
	[LedgerTypeCode] ASC,
	[Object] ASC
)
INCLUDE ( [BusinessUnitID],
[Balance07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_135]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_135] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC,
	[LedgerTypeCode] ASC,
	[Object] ASC
)
INCLUDE ( [BusinessUnitID],
[FiscalYearID],
[Balance07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_140]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_140] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC,
	[FiscalYearID] ASC,
	[LedgerTypeCode] ASC,
	[Object] ASC
)
INCLUDE ( [BusinessUnitID],
[Subsidiary],
[Balance07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_142]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_142] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC,
	[LedgerTypeCode] ASC,
	[Object] ASC
)
INCLUDE ( [BusinessUnitID],
[FiscalYearID],
[Subsidiary],
[Balance07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_181]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_181] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC,
	[FiscalYearID] ASC,
	[LedgerTypeCode] ASC,
	[Object] ASC
)
INCLUDE ( [BusinessUnitID],
[Subsidiary],
[Balance01]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_183]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_183] ON [dbo].[GL_Star_Facts] 
(
	[CompanyNumberID] ASC,
	[LedgerTypeCode] ASC,
	[Object] ASC
)
INCLUDE ( [BusinessUnitID],
[FiscalYearID],
[Subsidiary],
[Balance01]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_190]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_190] ON [dbo].[GL_Star_Facts] 
(
	[Object] ASC
)
INCLUDE ( [CompanyNumberID],
[BusinessUnitID],
[FiscalYearID],
[LedgerTypeCode],
[Subsidiary],
[PriorYearCloseBalance],
[Balance01],
[PriorYearEndNetPosting],
[BalanceForward]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_259]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_259] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting05]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_261]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_261] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting01]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_263]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_263] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting02]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_265]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_265] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting03]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_267]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_267] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting04]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_362]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_362] ON [dbo].[GL_Star_Facts] 
(
	[AccountID] ASC,
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[NetPosting09]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_377]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_377] ON [dbo].[GL_Star_Facts] 
(
	[AccountID] ASC,
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[NetPosting08]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_393]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_393] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting06]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_395]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_395] ON [dbo].[GL_Star_Facts] 
(
	[FiscalYear] ASC,
	[LedgerTypeCode] ASC
)
INCLUDE ( [BusinessUnitID],
[AccountID],
[NetPosting07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_447]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_447] ON [dbo].[GL_Star_Facts] 
(
	[LedgerTypeCode] ASC
)
INCLUDE ( [AIDID],
[FiscalYearID],
[Balance07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_450]    Script Date: 07/02/2010 09:33:14 ******/
CREATE NONCLUSTERED INDEX [missing_index_450] ON [dbo].[GL_Star_Facts] 
(
	[LedgerTypeCode] ASC,
	[CompanyNumberID] ASC
)
INCLUDE ( [AIDID],
[FiscalYearID],
[Balance07]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


